package stats;

import java.util.HashMap;

import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class CountChildren {
	public int CountElChildren (Element el) {
		return el.childNodes().size();
	}
	
	public HashMap<String, String> CountElementsChildren (Elements elements) {
		HashMap<String, String> hm = new HashMap<String, String>();

		for (Element el : elements) {
			hm.put(el.nodeName()+"-"+el.hashCode(), Integer.toString(CountElChildren(el)));
		}
		return hm;
	}
	
}
